package com.hbnu.video.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 视频表对象 yz_video
 * 
 * @author ruoyi
 * @date 2025-05-28
 */
public class Video extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 视频id */
    @Excel(name = "视频id")
    private Long id;

    /** 发布者id */
    @Excel(name = "发布者id")
    private Long userId;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 描述内容 */
    @Excel(name = "描述内容")
    private String description;

    /** 视频存储路径 */
    @Excel(name = "视频存储路径")
    private String videoUrl;

    /** 封面图路径 */
    @Excel(name = "封面图路径")
    private String coverUrl;

    /** 时长 */
    @Excel(name = "时长")
    private Long duration;

    /** 播放量 */
    @Excel(name = "播放量")
    private Long viewCount;

    /** 上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 是否通过审核 */
    @Excel(name = "是否通过审核")
    private Integer isApproved;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setVideoUrl(String videoUrl) 
    {
        this.videoUrl = videoUrl;
    }

    public String getVideoUrl() 
    {
        return videoUrl;
    }

    public void setCoverUrl(String coverUrl) 
    {
        this.coverUrl = coverUrl;
    }

    public String getCoverUrl() 
    {
        return coverUrl;
    }

    public void setDuration(Long duration) 
    {
        this.duration = duration;
    }

    public Long getDuration() 
    {
        return duration;
    }

    public void setViewCount(Long viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Long getViewCount() 
    {
        return viewCount;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setIsApproved(Integer isApproved) 
    {
        this.isApproved = isApproved;
    }

    public Integer getIsApproved() 
    {
        return isApproved;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("videoUrl", getVideoUrl())
            .append("coverUrl", getCoverUrl())
            .append("duration", getDuration())
            .append("viewCount", getViewCount())
            .append("createdAt", getCreatedAt())
            .append("isApproved", getIsApproved())
            .toString();
    }
}
